<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./vue.js"></script>
</head>

<body>
  <div id="app">
    {{1+1}}
    <br>
    {{true?'1':'2'}}
    <!-- {{(function(){ console.log('3') })()}} -->
    <div :id="divid" v-if="isShow" v-html="message"></div>
    <!-- <button v-bind:disabled="isdisabled" v-on:click="handleClick()">btn</button> -->

    <button v-bind:disabled="isdisabled" @click="handleClick()">btn</button>

    <a v-bind:[attrname]="url">我是一个超链接</a>
  </div>
  <script>
    var user = {
      name: "xiaoming",
      age: 20
    }
    var vm = new Vue({
      el: '#app',
      data: {
        attrname:'href',
        url:"http://www.baidu.com",
        isShow:true,
        isdisabled:false,
        divid:'wrapper',
        message: "<span style='color:red;'>helloworld</span>",

      },
      methods:{
        handleClick(){
          this.isShow = !this.isShow
        }
      }
    })


  </script>
</body>

</html>